from collections import namedtuple

Point=namedtuple('Point',['x','y'])
p=Point(1,2)
print(p.x,p.y)
print(isinstance(p,Point))
print(isinstance(p,tuple))

Circle=namedtuple('Circle',['x','y','r'])

from collections import deque #double endedqueue
q=deque(['a','b','c'])
q.append('x')
q.appendleft('y') #deque  append()\pop()\appendleft()\popleft()
print(q)

from collections import defaultdict
dd=defaultdict(lambda: 'N/A')
print(dd['KeyErro'])

#OrderedDict
#Counter    class (dict) 

from collections import Counter
c=Counter()
for ch in 'programming':
    c[ch]+=1
print(c)
